//! @author Adam Emil Skoog
//! @date   2012-01-05

#include "Block.h"
#include "Game.h"

namespace mehdi
 {
	Block::Block()
	 {
		if (!image)
			image = Game::getImageLoader()->get("block0");

		setReceptiveToGravity(false);
		CollisionMask *const mask(createCollisionMask());
		mask->setSize(sf::Vector2f(64.f,64.f));
	 }

	void Block::draw() const
	 {
		image->SetPosition(position());
		Game::getWindow()->Draw(*image);
	 }

	Image *Block::image = NULL;
 }
